<script setup>
defineProps({
  title: {
    required: true,
    type: String
  }
})
</script>

<template>
  <el-card class="page-container">
    <template #header>
      <div class="header">
        <span class="title">{{ title }}</span>
        <div class="extra">
          <slot name="extra"></slot>
        </div>
      </div>
    </template>
    <!-- 内容 -->
    <slot></slot>
  </el-card>
</template>

<style lang="scss" scoped>
.page-container {
  min-height: 100%;
  box-sizing: border-box;
  background: linear-gradient(to left, #849ebf, #9baec8);
  // background: linear-gradient(200deg, #e3c5eb, #a9c1ed);
  border: #6582aa;

  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .title {
      color: #666666;
      font-weight: bold;
    }
  }
}
</style>
